package sebastiankerckhof.scene.lighting;

import sebastiankerckhof.math.Color3f;
import sebastiankerckhof.math.Point3f;
import sebastiankerckhof.math.Vector3f;
import sebastiankerckhof.render.raytrace.Ray;
import sebastiankerckhof.render.raytrace.Hit.Hit;

public class PointLight extends AbstractLight{
	public Point3f position;
	
	public PointLight(Point3f pos, float intensity, Color3f color){
		this.position = pos;
		this.intensity = intensity;
		this.color = color;
	}
	
	@Override
  public Vector3f getDirectionToLight(Ray r, Point3f hitPoint) {
		Vector3f direction = this.position.subtract(hitPoint);
		direction = direction.normalize();
		return direction;
  }


}
